class Solution(object):
    def average(self, salary):
        return (sum(salary) - max(salary) - min(salary)) / (len(salary) - 2)